/*
 * Class Accumulator.java
 * 18.06.2012
 * 
 * Class accumulates the data received from the controller
 */

package accumulator;

/**
 * Class accumulates all data received from the controller
 * and affects the pokemon
 * 
 * @author Dima Glushko
 * @author Sergey Lopachuk
 * @version 1.01
 */

public class Accumulator {
	private int[][] sumArray;
	
	/**
	 * Accumulator class constructor
	 * @author Dima Glushko
	 * @author Sergey Lopachuk
	 */
	Accumulator()
	{
		sumArray = new int[SomeConstants.COUNT_OF_ORGANS][SomeConstants.COUNT_OF_PARAMS];
	}
	
	/**
	 * Accumulate the data in sum_arr
	 * @param new_info New data from controller
	 * @author Dima Glushko
	 * @author Sergey Lopachuk
	 */
	void addInfo(OrganInfo new_info)
	{
		for (int i = 0; i < SomeConstants.COUNT_OF_ORGANS; i++)
			for (int j = 0; j < SomeConstants.COUNT_OF_PARAMS; j++)
				sumArray[i][j] += new_info.getParameter(i, j);
	}
	
	/**
	 * Affects the pokemon
	 * @author Dima Glushko
	 * @author Sergey Lopachuk
	 */
	void pokemonInfluence()
	{
		
	}
	
	/**
	 * @return an array with the summed data
	 * @author Dima Glushko
	 * @author Sergey Lopachuk
	 */
	int[][] getSumArr()
	{
		return sumArray;
	}
}
